package common.system.dao;

import java.util.ArrayList;
import java.util.List;

import common.base.GenericHibernateDao;
import common.system.bean.Area;

@SuppressWarnings("unchecked")
public class AreaDaoImpl extends GenericHibernateDao<Area,Integer> implements AreaDao{

	@Override
	public List<Area> getAreaByCityId(int cityId) {
		List<Area> list = this.getHibernateTemplate().find("from Area a where a.city.id="+cityId);
		if(list!=null && list.size()>0){
			return ((List<Area>)list);
		}else{
			return new ArrayList<Area>();
		}
	}

}
